package com.hgw.Demo08_StatePattern.examples;

/**
 * Data time:2021/12/19 20:36
 * StudentID:2019112118
 * Author:hgw
 * Description: 账户状态类，充当抽象状态类
 */
public abstract class AccountState {
    protected Account acc;                            // 维持对环境类的引用
    public abstract void deposit(double amount);    // 存款
    public abstract void withdraw(double amount);   // 取款
    public abstract void computeInterest();         // 计算利息
    public abstract void stateCheck();              // 状态转换
}
